<?php
/**
 * 功能：发送邮件函数
 * 参数：$form 发送者邮箱； $to 接受者邮件； $subject 邮件主题； $message 邮件内容
 * 使用方法示例：sendmail('edu@gotrade.com','userenail@163.com','This is Email title','Email content');
**/
function sendmail($from, $to, $subject, $message){
	$message = "<html>
	<head><title>$subject</title></head>
	<body>$message</body>
	</html>";
	// To send HTML mail, the Content-type header must be set
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	// Additional headers
	$headers .= "From: ". $from . "\r\n";
	return @mail( $to, $subject, $message, $headers );
}
?>